﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MoFramework;

namespace UI
{
    namespace MoUI
    {
        public class SampleUIForm : BaseUIForm
        {
            private UIItemSlotGrid m_Grid;
            private SampleItemSlot m_SampleItemSlot;
            private List<UIItemSlotDataBase> m_SampleItemDatasLst;

            protected override void Awake()
            {
                base.Awake();
                m_Grid = GetObjComponent<UIItemSlotGrid>("Grid");
                m_SampleItemSlot = GetObjComponent<SampleItemSlot>("Sample");
                m_Grid.Init(m_SampleItemSlot);
                m_SampleItemSlot.gameObject.SetActive(false);
                m_SampleItemDatasLst = new List<UIItemSlotDataBase>();
            }

            public override void StartOpen()
            {
                base.StartOpen();
                m_SampleItemDatasLst.Add(new SampleItemSlotData());
                m_SampleItemDatasLst.Add(new SampleItemSlotData());
                m_SampleItemDatasLst.Add(new SampleItemSlotData());
                m_SampleItemDatasLst.Add(new SampleItemSlotData());
                m_Grid.proptyDatas = m_SampleItemDatasLst;
            }

        }
    }
}
